package com.example.mypic.utils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

import com.example.mypic.models.IPWallpaperImage;

public class Utils {

	public static final String IPWALLPAPER_IMAGE = "IPWallpaperImage";
	public static final String CATEGORYID = "CategoryID";
	public static final String IMAGEID = "ImageID";
	public static final String IMAGE = "Image";
	public static final String THUMNAIL_IMAGE = "ThumnailImage";
	public static final String VIEW = "View";
	public static final String DOWNLOAD = "Download";
	public static final String DEVICE = "Device";
	public static final String WIDTH = "Width";
	public static final String HEIGHT = "Height";
	public static final String FAVORITED = "Favorited";
	public static final String LAST_VIEW_TIME = "LastViewTime";

	public static final String DATABASE_NAME = "mypic.db";
	public static final int SCHEMA_VERSION = 1;
	public static final String TABLE_NAME = "pic";

	public static final String KEY = "key";

	public static HashMap<Integer, Drawable> recent = new HashMap<Integer, Drawable>();
	public static List<IPWallpaperImage> pics = new ArrayList<IPWallpaperImage>();

	public static boolean isNetworkAvaiable(Context context) {
		ConnectivityManager cm = (ConnectivityManager) context
				.getSystemService(Context.CONNECTIVITY_SERVICE);
		NetworkInfo info = cm.getActiveNetworkInfo();
		return (info != null);
	}
}
